import { post } from '@/utils/request';

type StateFlag = string | 'Y' | 'N';

export interface TrendParams {
  featureValue?: string;
  featureCode?: string;
  callTimeStart: string;
  callTimeEnd: string;
  xqdwCodes?: string;
  classifyCodes?: string;
  callSummaryCodes?: string;
  dealSummaryCodes?: string;
  subdivisionFlag?: StateFlag;
  trafficFlag?: StateFlag;
  otherFlag?: StateFlag;
  inputType?: string;
  inputParams?: string;
  page?: number;
  size?: number;
}

export interface TimeParams {
  featureValue?: string;
  featureCode?: string;
  callTimeStart: string;
  callTimeEnd: string;
  xqdwCodes: string;
  classifyCodes: string;
  callSummaryCodes: string;
  dealSummaryCodes: string;
  subdivisionFlag?: StateFlag;
  trafficFlag?: StateFlag;
  otherFlag?: StateFlag;
  inputType?: string;
  inputParams?: string;
  page?: number;
  size?: number;
}

//趋势视图
export async function getQueryCaseTrend(params: TrendParams) {
  return post('/series/detail/queryCaseTrend', params);
}

//分类统计
export async function getQueryMultiStat(params: TrendParams) {
  return post('/series/detail/queryMultiStat', params);
}

//辖区分析
export async function getQueryXqdwStat(params: TrendParams) {
  return post('/series/detail/queryXqdwStat', params);
}

//时间轴
export async function getQueryTimeLine(params: TimeParams) {
  return post('/series/detail/queryTimeLine', params);
}

//趋势视图
export async function getQueryCaseTrend2(params: TrendParams) {
  return post('/series/history/queryCaseTrend', params);
}

//分类统计
export async function getQueryMultiStat2(params: TrendParams) {
  return post('/series/history/queryMultiStat', params);
}

//辖区分析
export async function getQueryXqdwStat2(params: TrendParams) {
  return post('/series/history/queryXqdwStat', params);
}

//时间轴
export async function getQueryTimeLine2(params: TimeParams) {
  return post('/series/history/queryTimeLine', params);
}
